<extend name="Layout/aui_base" />
<block name="content">

<?php if (!is_null($allow)) { ?>
<script>
function onBridgeReady(){
    closeWindow();
}

if (typeof WeixinJSBridge == "undefined"){
    if( document.addEventListener ){
        document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false);
    }else if (document.attachEvent){
        document.attachEvent('WeixinJSBridgeReady', onBridgeReady);
        document.attachEvent('onWeixinJSBridgeReady', onBridgeReady);
    }
}else{
    onBridgeReady();
}
</script>

<?php } ?>

<script>
function closeWindow() {
    WeixinJSBridge.invoke('closeWindow',{},function(res){

    });
}
</script>

<style>
    body {
        background: url('__INS__/img/logo-bg.jpg') no-repeat;
        background-position: center;
        background-size: cover;
        position: relative;
    }
    .aui-content {
        margin-bottom: 0;
    }
    .content {
        position: absolute;
        width: 100%;
        height: 100%;
        overflow: hidden;
    }
    .info {
        position: relative;
        padding: 20px 0;
        width: 100%;
        height: 100%;
        text-align: center;
        vertical-align: center;
    }
    .info p.title {
        margin-bottom: 15px;
        color: #ffffff;
        font-size: 18px;
    }
    .logo {
        width: 100%;
        text-align: center;
        color: #ffffff;
        font-size: 36px;
        padding-top: 30px;
    }
    .box {
        position: absolute;
        top: 30%;
        margin: 45px;
        border-radius: 5px;
        overflow: hidden;
    }
    .box .input-group {
        background: #ffffff;
        background: rgba(255,255,255,0.4) !important;
        color: #ff9900;
        position: relative;
        display: table;
        border-collapse: separate;
        padding: 6px 0;
    }
    .box .btn-group {
        color: #ffffff;
        position: relative;
        display: table;
        border-collapse: separate;
        width: 100%;
        border-bottom-left-radius: 5px;
        border-bottom-right-radius: 5px;
        overflow: hidden;
    }
    .box .btn-group .aui-btn {
        border-radius: 0;
        margin: 0;
    }
    .box .input-group:after {
        position: absolute;
        right: 0;
        bottom: 0;
        left: 0;
        height: 1px;
        content: '';
        background-color: #ffffff;
        -webkit-transform: scaleY(.3);
        transform: scaleY(.3);
    }
    .box .input-group:last-child:after {
        height: 0;
    }
    .box .input-group .input-group-addon {
        font-size: 16px;
        font-weight: 400;
        line-height: 1;
        color: #ffffff;
        text-align: center;
        display: table-cell;
        width: 1%;
        white-space: nowrap;
        vertical-align: middle;
        padding: 6px 12px;
    }
    i.aui-iconfont {
        font-size: 18px;
    }
    .box .input-group .form-control {
        background: none;
        margin: 0;
        padding: 5px 0;
        display: table-cell;
        position: relative;
        z-index: 2;
        float: left;
        width: 100%;
        margin-bottom: 0;
        border:none;
        border-radius: 0;
        color: #ffffff;
    }

    input::-webkit-input-placeholder, textarea::-webkit-input-placeholder {
        color:    #ffffff;
    }
    .register {
        margin-top: 15px;
        font-size: 14px;
        color: #fff;
    }
</style>


<div class="aui-content content">
    <div class="info">
    <div class="logo">{:get_system_config("SYSTEM_NAME")}</div>
        <br />
        <p class="aui-text-center" style="color: #FFFFFF; font-size:large;">微信扫码登录确认</p>
        <div class="box">
            <div class="input-group">
                <span class="input-group-addon"><i class="aui-iconfont aui-icon-mobile"></i></span>
                <input type="text" name="mobile" id="mobile" class="form-control" value="<?= $phone ?>" readonly / >
            </div>
            <a href="{:U('app/qrlogin', ['allow' => '1']).'&randomStr='.urlencode($randomStr)}" class="aui-btn aui-btn-block aui-btn-success" style="margin-top: 10px; ">
                确   认
            </a>
            <button onclick="closeWindow()" class="aui-btn aui-btn-block aui-btn-danger" style="margin-top: 10px;">
                取   消
            </button>
        </div>
    </div>
</div>
</block>
